package com.four.hospital.controller;

import com.four.common.utils.R;
import com.four.hospital.entity.Follow;
import com.four.hospital.service.FollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:wsy
 * @Date: 2022/01/17/15:08
 * @Description
 */
@RestController
@RequestMapping("hospital/follow")
public class FollowController {

    @Autowired
    private FollowService followService;

    /**
     * 患者点击关注医生
     * @param userPhone
     * @param docId
     * @return
     */
    @PostMapping("/clickFollow/{userPhone}/{docId}")
    public R clickFollow(@PathVariable("userPhone")String userPhone,
                         @PathVariable("docId")Integer docId){
        followService.clickFollow(userPhone,docId);
        return R.ok("关注成功");
    }
}
